#ifndef MAINAPP_H
#define MAINAPP_H

#include <QMainWindow>
#include <QPushButton>
#include "TimeWidget.h"

QT_BEGIN_NAMESPACE
namespace Ui { class MainApp; }
QT_END_NAMESPACE

class MainApp : public QMainWindow
{
    Q_OBJECT

public:
    MainApp(QWidget *parent = nullptr);
    ~MainApp();
    void timeDataEdit(TimeWidget *tw);

    bool isEdit = false;
    TimeWidget *editTimeWidget;
    static MainApp *mainApp;

private slots:
    void on_btnAdd_clicked();

    void on_btnOk_clicked();

    void on_btnCancel_clicked();

private:
    Ui::MainApp *ui;
    void loadTimeList();//从数据库里加载数据
    void addTime(TimeEntity *timeData);
};
#endif // MAINAPP_H
